home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14169 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  961 b 

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Q:Hex to Decimal?    
  5. Date: Fri, 12 Apr 96 12:05:43 GMT
  6. Organization: none
  7. Message-ID: <829310743snz@genesis.demon.co.uk>
  8. References: <DpqLyJ.8Jy@rci.ripco.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <DpqLyJ.8Jy@rci.ripco.com> mambuhl@ripco.com "Martin Ambuhl" writes:
  15.  
  16. >> I'm struggling with the reverse situation, a function to convert an
  17. >>integer into a HEX string. Anybody got any ideas?? Thanks in advance for
  18. >>your help.
  19. >
  20. >        sprintf(target_string,"x",(unsigned)your_integer);
  21.  
  22. You'd better make that "%x"!
  23.  
  24. -- 
  25. -----------------------------------------
  26. Lawrence Kirby | fred@genesis.demon.co.uk
  27. Wilts, England | 70734.126@compuserve.com
  28. -----------------------------------------
  29.